﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using Redboil.Bfp.Client.Views;
using Redboil.Bfp.Client.Views.Transport;
using Redboil.Bfp.Client.ViewModels;
using Infragistics.Windows.DockManager;

namespace Redboil.Bfp.Client {
    public partial class MainWindow : Window, IView {
        public MainWindow() {
            InitializeComponent();
        }

        private void buttonAcceptOrder_Click(object sender, RoutedEventArgs e) {
            //IView view = new AcceptView();
            //view.Show();
        }

        private void buttonTrackOrder_Click(object sender, RoutedEventArgs e) {
            //this.frame1.NavigationService.Navigate(new SamplePage());
            //this.frame1.NavigationService.Navigate(new Uri("pack://application:,,,/Page1.xaml"));
        }

        private void buttonCompleteOrder_Click(object sender, RoutedEventArgs e) {

        }

        private void buttonInputFee_Click(object sender, RoutedEventArgs e) {

        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) {
            var result = MessageBox.Show("确认要退出物流业务支撑系统吗？", "退出", MessageBoxButton.YesNoCancel, MessageBoxImage.Question, MessageBoxResult.Yes);
            if(result == MessageBoxResult.Yes) {
                this.Close();
            }
            else {
                e.Cancel = true;
            }
        }

        private void Button_Click(object sender, RoutedEventArgs e) {
            AcceptOrderView view = new AcceptOrderView();
            //view.Show();
            ContentPane pane = this.xamDockManager1.AddDocument(view.Content, view);
            pane.AllowDocking = false;
            pane.AllowFloatingOnly = false;
        }
    }
}
